home *** CD-ROM | disk | FTP | other *** search
- surface
- WWAlphaPaintedPlastic(float Ks = .5,
- Kd = .5,
- Ka = 1,
- roughness = .1;
- color specularcolor = 1;
- string mapname = "")
- {
- point Nf = faceforward( N, I );
-
- if (mapname != "")
- { Ci = color texture(mapname); /* Use s and t */
- Oi = float texture(mapname[3]); /* Use s and t */
- }
- else
- { Ci = Cs;
- Oi = Os;
- }
- Ci = Oi * (Ci * (Ka*ambient() + Kd*diffuse(Nf)) + specularcolor * Ks * specular(Nf,-I,roughness) );
- }
-
-